﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_AddBrand : System.Web.UI.Page
{
    private Logging objLogging = new Logging();
    private string strApplicationName = MethodBase.GetCurrentMethod().DeclaringType.Name;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void SaveButton_Click(object sender, EventArgs e)
    {
        try
        {
            if (Page.IsValid)
            {
                using (ProjectASPEntities myEntities = new ProjectASPEntities())
                {
                    myEntities.insertBrand(NameText.Text);
                }
                Response.Redirect("Brands.aspx");
            }
        }
        catch (Exception ex)
        {
            objLogging.WriteLine(strApplicationName, ex.Message);
        }
    }
}